
--[[

    slimui - Copyright (c) 2011 atom0s, All rights reserved.

    See Copyright notice in slimui.lua
    
]]--

class 'Panel: CustomControl' { ... };

----------------------------------------------------------------------------------
-- func: Panel.__init__
-- desc: Constructor called when this object is first created.
----------------------------------------------------------------------------------
function Panel.__init__( self )
    CustomControl.__init__( self );
end

----------------------------------------------------------------------------------
-- func: Panel:Create
-- desc: Creates a new panel object.
----------------------------------------------------------------------------------
function Panel:Create( parent )
    if parent == nil or parent._object == nil then
        slimui:err( 'Panel:Create - parent must be set to create a control!' );
    end

    self._object = createPanel( parent._object );

    if self._object == nil then
        slimui:err( 'Panel:Create - failed to initialize a new object.' );
    end

    return self;
end

----------------------------------------------------------------------------------
-- func: Panel:GetAlignment
-- desc: Returns the alignment of this panel object.
----------------------------------------------------------------------------------
function Panel:GetAlignment( )
    return panel_getAlignment( self._object );
end

----------------------------------------------------------------------------------
-- func: Panel:SetAlignment
-- desc: Sets the alignment of this panel object.
----------------------------------------------------------------------------------
function Panel:SetAlignment( align )
    panel_setAlignment( self._object, align );
end

----------------------------------------------------------------------------------
-- func: Panel:GetBevelInner
-- desc: Returns the inner bevel property of this panel object.
----------------------------------------------------------------------------------
function Panel:GetBevelInner( )
    return panel_getBevelInner( self._object );
end

----------------------------------------------------------------------------------
-- func: Panel:SetBevelInner
-- desc: Sets the inner bevel property of this panel object.
----------------------------------------------------------------------------------
function Panel:SetBevelInner( bevel )
    panel_setBevelInner( self._object, bevel );
end

----------------------------------------------------------------------------------
-- func: Panel:GetBevelOuter
-- desc: Returns the outer bevel property of this panel object.
----------------------------------------------------------------------------------
function Panel:GetBevelOuter( )
    return panel_getBevelOuter( self._object );
end

----------------------------------------------------------------------------------
-- func: Panel:SetBevelOuter
-- desc: Sets the outer bevel property of this panel object.
----------------------------------------------------------------------------------
function Panel:SetBevelOuter( bevel )
    panel_setBevelOuter( self._object, bevel );
end

----------------------------------------------------------------------------------
-- func: Panel:GetBevelWidth
-- desc: Returns the bevel width of this panel object.
----------------------------------------------------------------------------------
function Panel:GetBevelWidth( )
    return panel_getBevelWidth( self._object );
end

----------------------------------------------------------------------------------
-- func: Panel:SetBevelWidth
-- desc: Sets the bevel width of this panel object.
----------------------------------------------------------------------------------
function Panel:SetBevelWidth( width )
    panel_setBevelWidth( self._object, width );
end

----------------------------------------------------------------------------------
-- func: Panel:GetFullRepaint
-- desc: Returns the full repaint property of this panel object.
----------------------------------------------------------------------------------
function Panel:GetFullRepaint( )
    return panel_getFullRepaint( self._object );
end

----------------------------------------------------------------------------------
-- func: Panel:SetFullRepaint
-- desc: Sets the full repaint property of this panel object.
----------------------------------------------------------------------------------
function Panel:SetFullRepaint( repaint )
    panel_setFullRepaint( self._object, repaint );
end



--[[ Debug information. ]]--------------------------------------------------------
if ( slimui:isdebug() == true ) then
    slimui:msg( '(Control) panel.lua successfully loaded.' );
end